﻿using System;

namespace Ewk.Extensions
{
    public static class ReferenceTypeExtensions
    {
        public static T ValidateArgumentForNull<T>(this T source, string parameterName) 
            where T : class
        {
            if (source == default(T))
            {
                throw new ArgumentNullException(parameterName);
            }

            return source;
        }
    }
}